package com.emaimed.search.controller;

import com.emaimed.search.pojo.EmaimedSms;
import com.emaimed.search.pojo.Result;
import com.emaimed.search.service.EmaimedSmsService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import javax.annotation.PostConstruct;
import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * @author wjt
 * @version 1.0
 * @date 2021/6/24 10:59
 */
@Controller
@RequestMapping("EmaimedSms")
public class EmaimedSmsController {

    @Resource
    private EmaimedSmsService emaimedSmsService;

    @RequestMapping(value = "/emaimedSmsById")
    @ResponseBody
    public EmaimedSms emaimedSmsById(@RequestParam(value = "Id") int id) {
        EmaimedSms emaimedSms = emaimedSmsService.selectByPrimaryKey(id);
        return emaimedSms;
    }

    @RequestMapping(value = "/emaimedSmsAll")
    @ResponseBody
    public List<EmaimedSms> getEmaimedSmsAll() {
        List<EmaimedSms> emaimedSms = emaimedSmsService.searchAll();
        return emaimedSms;
    }


}
